package com.example.order.mapper;

import com.example.order.controller.testtable;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface testtableMapper {

        @Insert("insert into testtable values(#{name},#{password},#{id})")
        int add(testtable user);

        @Update("update testtable set name=#{name},password=#{password} where id=#{id}")
        int update(testtable user);

        @Delete("delete from testtable where id=#{id}")
        int delete(String id);

        @Select("select * from testtable where id=#{id}")
        testtable findById(String id);

        @Select("select * from testtable")
        List<testtable> findAll();

}
